file(GLOB_RECURSE SOURCES *.cc)
file(GLOB HEADERS include/*.h)

foreach(def ${wxWidgets_DEFINITIONS})
 add_definitions(
	 -D${def}
 )
endforeach()
add_definitions(
 -DSCI_LEXER -DLINK_LEXERS
)

add_executable(raporter3
  ${SOURCES} ${HEADERS}
)

target_include_directories(raporter3
  PRIVATE
    $<INSTALL_INTERFACE:include>
    $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)

target_link_libraries(raporter3
  PRIVATE
    Szarp2
    wxcommon
    wxscintilla
    iks-client
    ${OPENSSL_LIBRARIES}
    ${OPENGL_LIBRARIES}
    ${XMLRPCEPI_LIBRARIES}
    ${CARES_LIBRARIES}
    ${SQLITE3_LIBRARIES}
    ${FTGL_LIBRARIES}
)

add_custom_target( raporter3_pl ALL msgfmt --output-file=pl/raporter3.mo pl/raporter3.po )
install(FILES pl/raporter3.mo DESTINATION "${SZARP_SHAREDIR}/locales/pl_PL/LC_MESSAGES/" )

install(TARGETS raporter3
  RUNTIME DESTINATION "${INSTALL_BINDIR}" DESTINATION bin)
